import tseslint from '@electron-toolkit/eslint-config-ts';
import eslintConfigPrettier from '@electron-toolkit/eslint-config-prettier';
import eslintPluginVue from 'eslint-plugin-vue';

export default tseslint.config(
	{ ignores: ['**/node_modules', '**/dist', '**/out'] },
	tseslint.configs.recommended,
	eslintPluginVue.configs['flat/recommended'],
	{
		files: ['**/*.vue'],
		languageOptions: {
			parserOptions: {
				parser: tseslint.parser,
			},
		},
	},
	{
		files: ['**/*.{ts,mts,tsx,vue}'],
		rules: {
			'@typescript-eslint/no-unused-vars': 'off',
			'@typescript-eslint/explicit-function-return-type': 'off', // 要求函数和类方法的显式返回类型

			'no-unused-vars': 'off', // 禁止出现未使用的变量
			'vue/require-default-prop': 'off',
			'vue/multi-word-component-names': 'off',
		},
	},
	eslintConfigPrettier
);
